<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2021.3.19
 * Time: 17:12
 */

$message = "hello";
$example = function () {
    var_dump($message);
};
$example();

$example = function () use($message) {
    var_dump($message);
};
$example();

$message = "worlds";
$example();